<?php
//Security Checking for the user if allowed to login.
session_start();
if(strlen($_SESSION['u_name'])==0)
{
	?>
	<script>
	window.open("admin-login.php","_self");
	</script>
	<?php 
	exit;
}

if(empty($_SESSION['u_name']))
{
	header("Location:admin-login.php");
}
//#########INCLUDE FILES########
include_once '../conf/db-config.php';
include_once '../conf/error.php';
include_once '../clsFetchData.php';
include_once '../array_to_xml.php';
include_once 'city-name.php';
//##############################

$userId = $_REQUEST['uid'];

	mysql_query("DELETE FROM tbl_users WHERE id=$userId");
	mysql_query("DELETE FROM tbl_user_city WHERE user_id=$userId");

	header("Location:admin-homepage.php");
?>